import json
import os



# region file operations
def read_text(file:str)->str:
    with open(file,"r") as fd:
        return fd.read()
def write_text(file:str,content:str):
    with open(file,"w") as fd:
        fd.write(content)

def save_image(file:str,img:bytes):
    with open(file,"wb") as image:
        image.write(img)
# endregion